Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve source heading buttons and interactions. #3202

Merged
merged 5 commits into from
Nov 26, 2023
Merged

Conversation

hgluka
Copy link
Contributor

@hgluka hgluka commented Oct 4, 2023

Description

Change next and previous source glyphs, mute the color when there is no next or previous source and show keybinding on hover.

Depends on atlas-engineer/prompter#24.

Fixes #2852.
Fixes #2556.

Discussion

It might be useful in general to have an inactive style class predefined.
cc @aartaka @lansingthomas

Checklist:

Everything in this checklist is required for each PR. Please do not approve a PR that does not have all of these items.

  • Git hygiene:
    • I have pulled from master before submitting this PR
    • There are no merge conflicts.
  • I've added the new dependencies as:
    • ASDF dependencies,
    • Git submodules,
      cd /path/to/nyxt/checkout
      git submodule add https://gitlab.common-lisp.net/nyxt/py-configparser _build/py-configparser
    • and Guix dependencies.
  • My code follows the style guidelines for Common Lisp code. See:
  • I have performed a self-review of my own code.
  • My code has been reviewed by at least one peer. (The peer review to approve a PR counts. The reviewer must download and test the code.)
  • Documentation:
    • All my code has docstrings and :documentations written in the aforementioned style. (It's OK to skip the docstring for really trivial parts.)
    • I have updated the existing documentation to match my changes.
    • I have commented my code in hard-to-understand areas.
    • I have updated the changelog.lisp with my changes if it's anything user-facing (new features, important bug fix, compatibility breakage).
      • Changelog update should be a separate commit.
    • I have added a migration.lisp entry for all compatibility-breaking changes.
    • (If this changes something about the features showcased on Nyxt website) I have these changes described in the new/existing article at Nyxt website or will notify one of maintainters to do so.
  • Compilation and tests:
    • My changes generate no new warnings.
    • I have added tests that prove my fix is effective or that my feature works. (If possible.)
    • I ran the tests locally ((asdf:test-system :nyxt) and (asdf:test-system :nyxt/gi-gtk)) and they pass.

@lansingthomas
Copy link
Contributor

Let's just keep the solution local for today :D

no need for a special class in other places yet.

thx Luka

@jmercouris
Copy link
Member

Will review ASAP!

@aadcg aadcg requested a review from jmercouris October 4, 2023 19:59
source/prompt-buffer.lisp Outdated Show resolved Hide resolved
@hgluka
Copy link
Contributor Author

hgluka commented Oct 6, 2023

I made a PR in the prompter library to add next-source-p and previous-source-p, so this PR now depends on atlas-engineer/prompter#24.

@aadcg
Copy link
Member

aadcg commented Oct 10, 2023

@hgluka I've bumped the submodule.

To conclude this PR:

I'll merge it when the patch to Guix has been accepted.

@hgluka hgluka changed the title Improve next and previous source buttons in prompt buffer. Improve source heading buttons and interactions. Oct 11, 2023
@hgluka
Copy link
Contributor Author

hgluka commented Oct 17, 2023

Here's a screenshot, by the way:

image

@lansingthomas Let me know what you think. When you approve, I'll add a changelog entry and it will be ready to merge.

@lansingthomas
Copy link
Contributor

Can you send me a video? -- alternatively we can screen share tomorrow (or today if you are willing).

@hgluka
Copy link
Contributor Author

hgluka commented Oct 17, 2023

I'll share my screen with you tomorrow. That way, we can work out any issues in real time.

On another note, I'm not sure why these builds are failing. There are a lot of Connection timed out messages when fetching the submodules.
@aadcg Any ideas?

@aadcg
Copy link
Member

aadcg commented Oct 17, 2023

@hgluka no idea. But I don't think we should care either, because CI is mostly useless. All it does can be trivially replicated locally. My intuition tells me that it will start magically to work again for no apparent reason. If it doesn't, we'll get to that.

@aadcg
Copy link
Member

aadcg commented Oct 18, 2023

The patch has been accepted on Guix meaning that we can move forward.

What's the status here? We should have this one ready by the end of the week so that it lands on the next release. Thanks.

@lansingthomas
Copy link
Contributor

Sorry I am the bottleneck for this at the moment. -- we are scheduled for tomorrow for another interaction review.

  • my concerns are about the size of the icons, functionally it is looking good.

@lansingthomas
Copy link
Contributor

had a nice convo with Luka -- we agreed on styling for the arrows. he is reporting an observed bug with the +/-

I approve of these changes.

Thx @hgluka

@hgluka
Copy link
Contributor Author

hgluka commented Oct 19, 2023

Yep, this is ready to review/merge @aadcg.

@aadcg
Copy link
Member

aadcg commented Oct 20, 2023

I will review when #3231 is fixed in this PR. Please let me know.

#3231 could have been spotted without @lansingthomas's intervention. That's part of the self-reviewing process expected from PRs. The work the team outputs can be as good as its ability to self-criticism.

@hgluka
Copy link
Contributor Author

hgluka commented Oct 30, 2023

@aadcg This PR is ready for a final review/merge.

@aadcg
Copy link
Member

aadcg commented Oct 31, 2023

There's a UI glitch in this PR. Sometimes, both arrows are inactive. I need to investigate.

@aadcg
Copy link
Member

aadcg commented Nov 8, 2023

There's a UI glitch in this PR. Sometimes, both arrows are inactive. I need to investigate.

Unfortunately, there's no easy way around it. Commit 28179e7 provides a detailed explanation. Therefore, this PR no longer closes #3139.

@jmercouris please review.

@aadcg
Copy link
Member

aadcg commented Nov 13, 2023

@jmercouris friendly ping.

@jmercouris
Copy link
Member

yes, sorry for the delay!

aadcg and others added 5 commits November 26, 2023 21:28
Change button glyphs for `next-source`, `previous-source` and
`toggle-attributes-display`.  Show keybinding on hover.  Not all added glyphs
are being used, but they may be useful in the future.

Move `toggle-attributes-source` button to the right.

Mute next/previous source arrow when next/previous source is unavailable.

Review CSS.
The previous commit introduces a UI glitch where the left arrow down button is
drawn as inactive by a brief moment.  The root cause isn't related to the
implementation of the feature itself, but due to the poor architecture design of
update-prompt-input.

Steps to reproduce:

- Invoke execute-command
- Run `(update-prompt-input (current-prompt-buffer) "fo")`

The issue can be understood by inspecting the calls to
`(prompt-render-suggestions prompt-buffer)` in `update-prompt-input`.
@aadcg aadcg merged commit bed40cd into master Nov 26, 2023
2 checks passed
@aadcg aadcg deleted the prompt-buffer-arrows branch November 26, 2023 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

button to trigger the toggle-attributes-display menu Display source count
4 participants